#ifndef LOGICAL_HANDLE_H
#define LOGICAL_HANDLE_H

#include "global.h"
#include "SingleClass.h"
#include <unordered_map>
#include <fstream>

// //传输任务
// class transfer_task_item{

// public:
//     long long transfered_point;
//     long long transfer_seq;

// }


#define RESPONSE_SLICE_FREQUENCY  10   //每10个包，回一次   
#define BUFFER_SIZE  8192
#define MAX_SEND_TIMES 256    // 每次最多发送256次，即最多2M


class logical_handle:public SingleClass<logical_handle>{
public:
    void file_send_apply(std::unordered_map<std::string,std::shared_ptr<std::ofstream>> &file_map,struct full_msg *);
    void file_slice_send(std::unordered_map<std::string,std::shared_ptr<std::ofstream>> &file_map,struct full_msg *);
    void file_download_apply(std::unordered_map<std::string,std::shared_ptr<std::ifstream>> &read_file_map,struct full_msg *);
    //std::unordered_map<std::string,std::shared_ptr<transfer_task_item>> task_map;  //还是不要了
private:


};
#endif